This notebook contains codes used in the article “Did Exposure to Asylum Seeking Migration Affect the Electoral Outcome of Alternative For Germany in Berlin? Evidence from the 2019 EU Elections”. This article analyses the impact of exposure to asylum-seeking migration during the European ‘refugee crisis’ on the votes for the far right Alternative fur Deuschland at the 2019 EU elections in Berlin.

1 Load Packages

library('sf')
library(maptools)
library(lmtest)
library(sp)  # vector data
library(raster)  # raster data
library(rgdal)  # input/output, projections
library(rgeos)  # geometry ops
library("robustHD")
library(sjPlot)
library(ggplot2)
library(Metrics)
library(readr)
library(spdep)  # spatial dependence
library(spatialreg)
library(MLmetrics)
library(RColorBrewer)
library("latticeExtra")

2 Load Data

2.1 Building spatial weight matrix

Characteristics of weights list object:
Neighbour list object:
Number of regions: 489 
Number of nonzero links: 2714 
Percentage nonzero weights: 1.13499 
Average number of links: 5.550102 

Weights style: W 
Weights constants summary:

2.2 OLS model for exposure to reception facilities (Figure A1)


Call:
lm(formula = AfD2019.x ~ exposure_n + ow.x + conc_L3_no + pca.x, 
    data = chi.poly@data)

Residuals:
      Min        1Q    Median        3Q       Max 
-0.088884 -0.022270 -0.000591  0.022161  0.146368 

Coefficients:
             Estimate Std. Error t value       Pr(>|t|)    
(Intercept) -0.042465   0.032792  -1.295          0.196    
exposure_n  -0.045045   0.007039  -6.400 0.000000000369 ***
ow.xgW      -0.031263   0.005035  -6.209 0.000000001150 ***
conc_L3_no  -0.567891   0.051649 -10.995        < 2e-16 ***
pca.x        0.018099   0.001076  16.819        < 2e-16 ***
---
Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1

Residual standard error: 0.03528 on 484 degrees of freedom
Multiple R-squared:  0.5261,    Adjusted R-squared:  0.5222 
F-statistic: 134.3 on 4 and 484 DF,  p-value: < 2.2e-16

[1] 489

2.3 SAR model 1 for exposure to reception facilities (Figure A2 & Table 1)


Call:lagsarlm(formula = AfD2019.x ~ exposure_n + ow.x + conc_L3_no + 
    pca.x, data = chi.poly@data, listw = W, na.action = na.exclude)

Residuals:
        Min          1Q      Median          3Q         Max 
-0.05701226 -0.01222347  0.00027771  0.01071055  0.05096098 

Type: lag 
Coefficients: (asymptotic standard errors) 
              Estimate Std. Error z value Pr(>|z|)
(Intercept) -0.0101136  0.0157054 -0.6440  0.51960
exposure_n  -0.0079479  0.0034744 -2.2876  0.02216
ow.xgW      -0.0056096  0.0025638 -2.1880  0.02867
conc_L3_no  -0.1169382  0.0260797 -4.4839 7.33e-06
pca.x        0.0050070  0.0006246  8.0163 1.11e-15

Rho: 0.86464, LR test value: 609.46, p-value: < 2.22e-16
Asymptotic standard error: 0.020056
    z-value: 43.111, p-value: < 2.22e-16
Wald statistic: 1858.6, p-value: < 2.22e-16

Log likelihood: 1248.876 for lag model
ML residual variance (sigma squared): 0.00028487, (sigma: 0.016878)
Number of observations: 489 
Number of parameters estimated: 7 
AIC: -2483.8, (AIC for lm: -1876.3)
LM test for residual autocorrelation
test value: 1.0975, p-value: 0.29482

Impact measures (lag, exact):
                 Direct    Indirect       Total
exposure_n -0.010688322 -0.04802658 -0.05871490
ow.xgW     -0.007543782 -0.03389700 -0.04144078
conc_L3_no -0.157258139 -0.70661898 -0.86387712
pca.x       0.006733379  0.03025556  0.03698894
Impact measures (lag, exact):
                 Direct    Indirect       Total
exposure_n -0.010688322 -0.04802658 -0.05871490
ow.xgW     -0.007543782 -0.03389700 -0.04144078
conc_L3_no -0.157258139 -0.70661898 -0.86387712
pca.x       0.006733379  0.03025556  0.03698894
========================================================
Simulation results ( variance matrix):
Direct:

Iterations = 1:100
Thinning interval = 1 
Number of chains = 1 
Sample size per chain = 100 

1. Empirical mean and standard deviation for each variable,
   plus standard error of the mean:

                Mean        SD   Naive SE Time-series SE
exposure_n -0.010754 0.0046727 0.00046727     0.00046727
ow.xgW     -0.007324 0.0028416 0.00028416     0.00023985
conc_L3_no -0.159036 0.0304661 0.00304661     0.00304661
pca.x       0.006806 0.0006909 0.00006909     0.00005237

2. Quantiles for each variable:

                2.5%       25%       50%       75%     97.5%
exposure_n -0.018653 -0.013663 -0.011086 -0.008611 -0.001445
ow.xgW     -0.013347 -0.009102 -0.007286 -0.005704 -0.001413
conc_L3_no -0.213306 -0.179057 -0.160145 -0.139050 -0.100844
pca.x       0.005508  0.006405  0.006734  0.007162  0.008200

========================================================
Indirect:

Iterations = 1:100
Thinning interval = 1 
Number of chains = 1 
Sample size per chain = 100 

1. Empirical mean and standard deviation for each variable,
   plus standard error of the mean:

               Mean       SD  Naive SE Time-series SE
exposure_n -0.04986 0.022770 0.0022770      0.0022770
ow.xgW     -0.03369 0.013546 0.0013546      0.0011385
conc_L3_no -0.73538 0.153603 0.0153603      0.0153603
pca.x       0.03157 0.004736 0.0004736      0.0005478

2. Quantiles for each variable:

               2.5%      25%      50%      75%    97.5%
exposure_n -0.09326 -0.06457 -0.05201 -0.03494 -0.00668
ow.xgW     -0.06610 -0.04087 -0.03228 -0.02564 -0.00756
conc_L3_no -1.01013 -0.84960 -0.71299 -0.62333 -0.45752
pca.x       0.02381  0.02843  0.03111  0.03425  0.04159

========================================================
Total:

Iterations = 1:100
Thinning interval = 1 
Number of chains = 1 
Sample size per chain = 100 

1. Empirical mean and standard deviation for each variable,
   plus standard error of the mean:

               Mean       SD  Naive SE Time-series SE
exposure_n -0.06062 0.027212 0.0027212       0.002721
ow.xgW     -0.04101 0.016213 0.0016213       0.001364
conc_L3_no -0.89441 0.176846 0.0176846       0.017685
pca.x       0.03837 0.005026 0.0005026       0.000570

2. Quantiles for each variable:

               2.5%      25%      50%      75%     97.5%
exposure_n -0.11045 -0.07773 -0.06393 -0.04459 -0.008269
ow.xgW     -0.07888 -0.04941 -0.03910 -0.03128 -0.008973
conc_L3_no -1.18794 -1.04253 -0.87675 -0.76243 -0.549177
pca.x       0.03010  0.03515  0.03810  0.04129  0.048974

========================================================
Simulated standard errors
                 Direct    Indirect       Total
exposure_n 0.0046726831 0.022770470 0.027211825
ow.xgW     0.0028415785 0.013546366 0.016212560
conc_L3_no 0.0304660514 0.153603224 0.176846293
pca.x      0.0006908814 0.004736193 0.005026306

Simulated z-values:
              Direct  Indirect     Total
exposure_n -2.301395 -2.189767 -2.227550
ow.xgW     -2.577382 -2.486810 -2.529586
conc_L3_no -5.220091 -4.787500 -5.057562
pca.x       9.851703  6.664837  7.634297

Simulated p-values:
           Direct        Indirect   Total     
exposure_n 0.0213693     0.028541   0.025911  
ow.xgW     0.0099552     0.012889   0.011420  
conc_L3_no 0.00000017884 1.6887e-06 4.2465e-07
pca.x      < 2.22e-16    2.6496e-11 2.2649e-14

2.4 OLS model for exposure to asylum-seekers (Figure A3)


Call:
lm(formula = AfD2019.x ~ exposure.x + ow.x + conc_L3_no + pca.x, 
    data = chi.poly@data)

Residuals:
      Min        1Q    Median        3Q       Max 
-0.091704 -0.022216 -0.001492  0.023462  0.136806 

Coefficients:
             Estimate Std. Error t value   Pr(>|t|)    
(Intercept)  0.205562   0.009454  21.744    < 2e-16 ***
exposure.x  -0.032678   0.007276  -4.491 0.00000887 ***
ow.xgW      -0.024769   0.005037  -4.917 0.00000120 ***
conc_L3_no  -0.647407   0.049519 -13.074    < 2e-16 ***
pca.x        0.018859   0.001101  17.130    < 2e-16 ***
---
Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1

Residual standard error: 0.036 on 484 degrees of freedom
Multiple R-squared:  0.5065,    Adjusted R-squared:  0.5025 
F-statistic: 124.2 on 4 and 484 DF,  p-value: < 2.2e-16

[1] 489

2.4.1 dwtest-OLS 2


    Durbin-Watson test

data:  lm(AfD2019.x ~ exposure.x + ow.x + pca.x + conc_L3_no, data = chi.poly@data)
DW = 1.8857, p-value = 0.09312
alternative hypothesis: true autocorrelation is greater than 0

2.4.2 Moran test


    Global Moran I for regression residuals

data:  
model: lm(formula = AfD2019.x ~ exposure.x + ow.x + conc_L3_no + pca.x, data = chi.poly@data)
weights: W

Moran I statistic standard deviate = 24.036, p-value < 2.2e-16
alternative hypothesis: two.sided
sample estimates:
Observed Moran I      Expectation         Variance 
    0.6567316075    -0.0079638547     0.0007647664 

    Lagrange multiplier diagnostics for spatial dependence

data:  
model: lm(formula = AfD2019.x ~ exposure.x + ow.x + conc_L3_no + pca.x, data = chi.poly@data)
weights: W

LMerr = 545.28, df = 1, p-value < 2.2e-16


    Lagrange multiplier diagnostics for spatial dependence

data:  
model: lm(formula = AfD2019.x ~ exposure.x + ow.x + conc_L3_no + pca.x, data = chi.poly@data)
weights: W

LMlag = 568.76, df = 1, p-value < 2.2e-16


    Lagrange multiplier diagnostics for spatial dependence

data:  
model: lm(formula = AfD2019.x ~ exposure.x + ow.x + conc_L3_no + pca.x, data = chi.poly@data)
weights: W

RLMerr = 39.126, df = 1, p-value = 0.0000000003973


    Lagrange multiplier diagnostics for spatial dependence

data:  
model: lm(formula = AfD2019.x ~ exposure.x + ow.x + conc_L3_no + pca.x, data = chi.poly@data)
weights: W

RLMlag = 62.608, df = 1, p-value = 2.554e-15


    Lagrange multiplier diagnostics for spatial dependence

data:  
model: lm(formula = AfD2019.x ~ exposure.x + ow.x + conc_L3_no + pca.x, data = chi.poly@data)
weights: W

SARMA = 607.89, df = 2, p-value < 2.2e-16

2.5 SAR model 2 for exposure to asylum-seekers (Figure A4 & Table 2)


Call:lagsarlm(formula = AfD2019.x ~ exposure.x + ow.x + pca.x + conc_L3_no, 
    data = chi.poly@data, listw = W, na.action = na.exclude)

Residuals:
        Min          1Q      Median          3Q         Max 
-0.05608675 -0.01238399  0.00027521  0.01055404  0.05140061 

Type: lag 
Coefficients: (asymptotic standard errors) 
               Estimate  Std. Error z value  Pr(>|z|)
(Intercept)  0.03311297  0.00584027  5.6698 1.430e-08
exposure.x  -0.00599706  0.00345216 -1.7372   0.08235
ow.xgW      -0.00450922  0.00247456 -1.8222   0.06842
pca.x        0.00506612  0.00062651  8.0862 6.661e-16
conc_L3_no  -0.12679607  0.02506544 -5.0586 4.223e-07

Rho: 0.86969, LR test value: 626.97, p-value: < 2.22e-16
Asymptotic standard error: 0.019626
    z-value: 44.313, p-value: < 2.22e-16
Wald statistic: 1963.6, p-value: < 2.22e-16

Log likelihood: 1247.752 for lag model
ML residual variance (sigma squared): 0.00028502, (sigma: 0.016882)
Number of observations: 489 
Number of parameters estimated: 7 
AIC: -2481.5, (AIC for lm: -1856.5)
LM test for residual autocorrelation
test value: 1.5757, p-value: 0.20938

Impact measures (lag, exact):
                 Direct    Indirect       Total
exposure.x -0.008126361 -0.03789353 -0.04601989
ow.xgW     -0.006110246 -0.02849231 -0.03460255
pca.x       0.006864878  0.03201119  0.03887606
conc_L3_no -0.171815895 -0.80118396 -0.97299986
========================================================
Simulation results ( variance matrix):
Direct:

Iterations = 1:100
Thinning interval = 1 
Number of chains = 1 
Sample size per chain = 100 

1. Empirical mean and standard deviation for each variable,
   plus standard error of the mean:

                Mean        SD   Naive SE Time-series SE
exposure.x -0.008862 0.0046645 0.00046645     0.00062725
ow.xgW     -0.006219 0.0035012 0.00035012     0.00035012
pca.x       0.006869 0.0007667 0.00007667     0.00006197
conc_L3_no -0.174048 0.0323798 0.00323798     0.00323798

2. Quantiles for each variable:

                2.5%       25%       50%       75%      97.5%
exposure.x -0.017686 -0.012224 -0.009430 -0.005695 -0.0004117
ow.xgW     -0.012857 -0.008771 -0.006224 -0.004086  0.0005193
pca.x       0.005211  0.006375  0.006821  0.007371  0.0082815
conc_L3_no -0.234502 -0.194053 -0.177605 -0.155226 -0.1070961

========================================================
Indirect:

Iterations = 1:100
Thinning interval = 1 
Number of chains = 1 
Sample size per chain = 100 

1. Empirical mean and standard deviation for each variable,
   plus standard error of the mean:

               Mean       SD  Naive SE Time-series SE
exposure.x -0.04193 0.023310 0.0023310      0.0027527
ow.xgW     -0.02912 0.016516 0.0016516      0.0016516
pca.x       0.03213 0.004662 0.0004662      0.0004662
conc_L3_no -0.81080 0.151622 0.0151622      0.0151622

2. Quantiles for each variable:

               2.5%      25%      50%      75%     97.5%
exposure.x -0.09188 -0.05577 -0.04474 -0.02378 -0.001901
ow.xgW     -0.05857 -0.03813 -0.02849 -0.01963  0.002460
pca.x       0.02515  0.02880  0.03109  0.03458  0.043434
conc_L3_no -1.15972 -0.90619 -0.80236 -0.71189 -0.544093

========================================================
Total:

Iterations = 1:100
Thinning interval = 1 
Number of chains = 1 
Sample size per chain = 100 

1. Empirical mean and standard deviation for each variable,
   plus standard error of the mean:

               Mean       SD  Naive SE Time-series SE
exposure.x -0.05079 0.027816 0.0027816      0.0032698
ow.xgW     -0.03534 0.019919 0.0019919      0.0019919
pca.x       0.03900 0.005083 0.0005083      0.0005083
conc_L3_no -0.98484 0.176625 0.0176625      0.0176625

2. Quantiles for each variable:

               2.5%      25%      50%      75%     97.5%
exposure.x -0.11159 -0.06798 -0.05514 -0.02957 -0.002312
ow.xgW     -0.07085 -0.04615 -0.03502 -0.02340  0.002979
pca.x       0.03111  0.03545  0.03822  0.04204  0.051205
conc_L3_no -1.36639 -1.10486 -0.98288 -0.86769 -0.651486

========================================================
Simulated standard errors
                 Direct    Indirect       Total
exposure.x 0.0046644783 0.023309656 0.027815735
ow.xgW     0.0035011868 0.016515848 0.019919397
pca.x      0.0007666873 0.004662331 0.005082605
conc_L3_no 0.0323797590 0.151621701 0.176625326

Simulated z-values:
              Direct  Indirect     Total
exposure.x -1.899857 -1.798646 -1.825861
ow.xgW     -1.776229 -1.763303 -1.774218
pca.x       8.959239  6.890744  7.672417
conc_L3_no -5.375209 -5.347493 -5.575893

Simulated p-values:
           Direct         Indirect         Total     
exposure.x 0.057452       0.072075         0.067871  
ow.xgW     0.075695       0.077849         0.076027  
pca.x      < 2.22e-16     0.00000000000555 1.6875e-14
conc_L3_no 0.000000076494 0.00000008918098 2.4626e-08

2.6 Additional models (SAR models 3 to 7, the effect reported is the total effect)

Model 3 to 7 from Table 3 is produced from the following codes:

2.6.1 model 3


Call:
lm(formula = AfD2019.x ~ exposure.x + exposure.x * pca.x + ow.x + 
    conc_L3_no, data = chi.poly@data)

Residuals:
      Min        1Q    Median        3Q       Max 
-0.089002 -0.024535 -0.000788  0.022708  0.117589 

Coefficients:
                  Estimate Std. Error t value   Pr(>|t|)    
(Intercept)       0.197812   0.009425  20.987    < 2e-16 ***
exposure.x       -0.026546   0.007261  -3.656   0.000284 ***
pca.x             0.004403   0.003369   1.307   0.191891    
ow.xgW           -0.023419   0.004948  -4.733 0.00000290 ***
conc_L3_no       -0.681091   0.049115 -13.867    < 2e-16 ***
exposure.x:pca.x  0.013208   0.002916   4.530 0.00000745 ***
---
Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1

Residual standard error: 0.03529 on 483 degrees of freedom
Multiple R-squared:  0.5267,    Adjusted R-squared:  0.5218 
F-statistic: 107.5 on 5 and 483 DF,  p-value: < 2.2e-16

Call:lagsarlm(formula = AfD2019.x ~ exposure.x + exposure.x * pca.x + 
    ow.x + conc_L3_no, data = chi.poly@data, listw = W, na.action = na.exclude)

Residuals:
         Min           1Q       Median           3Q          Max 
-0.058306676 -0.012100064  0.000054157  0.010943340  0.050782412 

Type: lag 
Coefficients: (asymptotic standard errors) 
                   Estimate Std. Error z value      Pr(>|z|)
(Intercept)       0.0323133  0.0058981  5.4786 0.00000004287
exposure.x       -0.0044550  0.0034895 -1.2767      0.201716
pca.x             0.0010238  0.0016117  0.6353      0.525256
ow.xgW           -0.0042888  0.0024744 -1.7332      0.083054
conc_L3_no       -0.1407938  0.0255197 -5.5171 0.00000003447
exposure.x:pca.x  0.0037974  0.0014001  2.7122      0.006684

Rho: 0.86248, LR test value: 613.91, p-value: < 2.22e-16
Asymptotic standard error: 0.020083
    z-value: 42.947, p-value: < 2.22e-16
Wald statistic: 1844.4, p-value: < 2.22e-16

Log likelihood: 1251.398 for lag model
ML residual variance (sigma squared): 0.00028243, (sigma: 0.016806)
Number of observations: 489 
Number of parameters estimated: 8 
AIC: -2486.8, (AIC for lm: -1874.9)
LM test for residual autocorrelation
test value: 1.2793, p-value: 0.25803

Impact measures (lag, exact):
                       Direct     Indirect        Total
exposure.x       -0.005972152 -0.026422955 -0.032395108
pca.x             0.001372535  0.006072591  0.007445126
ow.xgW           -0.005749395 -0.025437397 -0.031186793
conc_L3_no       -0.188742931 -0.835066775 -1.023809705
exposure.x:pca.x  0.005090685  0.022523026  0.027613710
Impact measures (lag, exact):
                       Direct     Indirect        Total
exposure.x       -0.005972152 -0.026422955 -0.032395108
pca.x             0.001372535  0.006072591  0.007445126
ow.xgW           -0.005749395 -0.025437397 -0.031186793
conc_L3_no       -0.188742931 -0.835066775 -1.023809705
exposure.x:pca.x  0.005090685  0.022523026  0.027613710
========================================================
Simulation results ( variance matrix):
Direct:

Iterations = 1:100
Thinning interval = 1 
Number of chains = 1 
Sample size per chain = 100 

1. Empirical mean and standard deviation for each variable,
   plus standard error of the mean:

                       Mean       SD  Naive SE Time-series SE
exposure.x       -0.0060067 0.004329 0.0004329      0.0004329
pca.x             0.0009496 0.002365 0.0002365      0.0002824
ow.xgW           -0.0061481 0.003053 0.0003053      0.0002190
conc_L3_no       -0.1841645 0.034190 0.0034190      0.0023910
exposure.x:pca.x  0.0053873 0.001956 0.0001956      0.0002547

2. Quantiles for each variable:

                      2.5%       25%        50%       75%      97.5%
exposure.x       -0.014234 -0.008836 -0.0062672 -0.002719  0.0023441
pca.x            -0.004355 -0.000434  0.0008706  0.002824  0.0047179
ow.xgW           -0.011518 -0.008227 -0.0060636 -0.003596 -0.0009673
conc_L3_no       -0.235606 -0.212335 -0.1843537 -0.161763 -0.1214797
exposure.x:pca.x  0.002095  0.003959  0.0054691  0.006704  0.0096284

========================================================
Indirect:

Iterations = 1:100
Thinning interval = 1 
Number of chains = 1 
Sample size per chain = 100 

1. Empirical mean and standard deviation for each variable,
   plus standard error of the mean:

                      Mean      SD Naive SE Time-series SE
exposure.x       -0.027153 0.01971 0.001971      0.0019710
pca.x             0.003829 0.01155 0.001155      0.0011551
ow.xgW           -0.027632 0.01373 0.001373      0.0007563
conc_L3_no       -0.830669 0.15679 0.015679      0.0156790
exposure.x:pca.x  0.024862 0.01131 0.001131      0.0011310

2. Quantiles for each variable:

                      2.5%       25%       50%      75%     97.5%
exposure.x       -0.062416 -0.040390 -0.028639 -0.01125  0.009958
pca.x            -0.026851 -0.001873  0.004314  0.01233  0.022773
ow.xgW           -0.055321 -0.037837 -0.025895 -0.01665 -0.004701
conc_L3_no       -1.149011 -0.937507 -0.830872 -0.72626 -0.530549
exposure.x:pca.x  0.009273  0.016428  0.024101  0.03068  0.053942

========================================================
Total:

Iterations = 1:100
Thinning interval = 1 
Number of chains = 1 
Sample size per chain = 100 

1. Empirical mean and standard deviation for each variable,
   plus standard error of the mean:

                      Mean      SD Naive SE Time-series SE
exposure.x       -0.033159 0.02391 0.002391      0.0023913
pca.x             0.004779 0.01388 0.001388      0.0013880
ow.xgW           -0.033780 0.01663 0.001663      0.0009264
conc_L3_no       -1.014834 0.18056 0.018056      0.0123804
exposure.x:pca.x  0.030249 0.01309 0.001309      0.0013087

2. Quantiles for each variable:

                     2.5%       25%       50%      75%     97.5%
exposure.x       -0.07601 -0.048768 -0.035040 -0.01406  0.012203
pca.x            -0.03081 -0.002307  0.005337  0.01525  0.027544
ow.xgW           -0.06698 -0.046513 -0.031744 -0.02059 -0.005669
conc_L3_no       -1.36917 -1.144918 -1.022959 -0.88421 -0.644930
exposure.x:pca.x  0.01174  0.019961  0.029914  0.03652  0.064111

========================================================
Simulated standard errors
                      Direct   Indirect      Total
exposure.x       0.004329251 0.01971019 0.02391320
pca.x            0.002365448 0.01155071 0.01387994
ow.xgW           0.003053395 0.01373116 0.01663360
conc_L3_no       0.034189894 0.15679025 0.18056421
exposure.x:pca.x 0.001956460 0.01131024 0.01308744

Simulated z-values:
                     Direct   Indirect      Total
exposure.x       -1.3874786 -1.3775991 -1.3866599
pca.x             0.4014265  0.3315166  0.3442959
ow.xgW           -2.0135161 -2.0123356 -2.0308149
conc_L3_no       -5.3865180 -5.2979643 -5.6203479
exposure.x:pca.x  2.7535931  2.1981966  2.3113325

Simulated p-values:
                 Direct         Indirect     Total         
exposure.x       0.1652959      0.168327     0.165545      
pca.x            0.6881061      0.740254     0.730624      
ow.xgW           0.0440604      0.044185     0.042274      
conc_L3_no       0.000000071836 0.0000001171 0.000000019057
exposure.x:pca.x 0.0058945      0.027935     0.020814      

2.6.2 model 4


Call:
lm(formula = AfD2019.x ~ exposure.x + exposure.x * conc_L3_no + 
    ow.x + pca.x, data = chi.poly@data)

Residuals:
      Min        1Q    Median        3Q       Max 
-0.091033 -0.022421 -0.002011  0.022985  0.132349 

Coefficients:
                       Estimate Std. Error t value   Pr(>|t|)    
(Intercept)            0.214687   0.012890  16.655    < 2e-16 ***
exposure.x            -0.039752   0.009955  -3.993 0.00007528 ***
conc_L3_no            -0.826226   0.178732  -4.623 0.00000487 ***
ow.xgW                -0.023927   0.005101  -4.690 0.00000355 ***
pca.x                  0.019130   0.001131  16.913    < 2e-16 ***
exposure.x:conc_L3_no  0.131733   0.126515   1.041      0.298    
---
Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1

Residual standard error: 0.03599 on 483 degrees of freedom
Multiple R-squared:  0.5076,    Adjusted R-squared:  0.5026 
F-statistic:  99.6 on 5 and 483 DF,  p-value: < 2.2e-16

Call:lagsarlm(formula = AfD2019.x ~ exposure.x + exposure.x * conc_L3_no + 
    ow.x + pca.x, data = chi.poly@data, listw = W, na.action = na.exclude)

Residuals:
        Min          1Q      Median          3Q         Max 
-0.05673297 -0.01251224  0.00036802  0.01035422  0.05138535 

Type: lag 
Coefficients: (asymptotic standard errors) 
                         Estimate  Std. Error z value  Pr(>|z|)
(Intercept)            0.03504831  0.00722688  4.8497 1.236e-06
exposure.x            -0.00745739  0.00471303 -1.5823   0.11358
conc_L3_no            -0.16365243  0.08470207 -1.9321   0.05335
ow.xgW                -0.00434417  0.00250277 -1.7357   0.08261
pca.x                  0.00512668  0.00063995  8.0110 1.110e-15
exposure.x:conc_L3_no  0.02700800  0.05937366  0.4549   0.64919

Rho: 0.86936, LR test value: 626.08, p-value: < 2.22e-16
Asymptotic standard error: 0.019625
    z-value: 44.299, p-value: < 2.22e-16
Wald statistic: 1962.4, p-value: < 2.22e-16

Log likelihood: 1247.855 for lag model
ML residual variance (sigma squared): 0.00028497, (sigma: 0.016881)
Number of observations: 489 
Number of parameters estimated: 8 
AIC: -2479.7, (AIC for lm: -1855.6)
LM test for residual autocorrelation
test value: 1.6057, p-value: 0.2051

Impact measures (lag, exact):
                            Direct    Indirect       Total
exposure.x            -0.010100145 -0.04698334 -0.05708348
conc_L3_no            -0.221647714 -1.03104946 -1.25269717
ow.xgW                -0.005883658 -0.02736930 -0.03325296
pca.x                  0.006943473  0.03229929  0.03924277
exposure.x:conc_L3_no  0.036579121  0.17015688  0.20673600
========================================================
Simulation results ( variance matrix):
Direct:

Iterations = 1:100
Thinning interval = 1 
Number of chains = 1 
Sample size per chain = 100 

1. Empirical mean and standard deviation for each variable,
   plus standard error of the mean:

                           Mean        SD   Naive SE Time-series SE
exposure.x            -0.011855 0.0070116 0.00070116     0.00060278
conc_L3_no            -0.238619 0.1228803 0.01228803     0.01228803
ow.xgW                -0.005991 0.0036431 0.00036431     0.00031443
pca.x                  0.007003 0.0007897 0.00007897     0.00007897
exposure.x:conc_L3_no  0.048650 0.0845507 0.00845507     0.00845507

2. Quantiles for each variable:

                          2.5%       25%       50%       75%     97.5%
exposure.x            -0.02799 -0.015656 -0.011930 -0.006751 0.0002868
conc_L3_no            -0.47141 -0.320265 -0.223699 -0.165759 0.0036787
ow.xgW                -0.01295 -0.008412 -0.006216 -0.003211 0.0005869
pca.x                  0.00558  0.006454  0.006986  0.007483 0.0085769
exposure.x:conc_L3_no -0.10740 -0.008109  0.048088  0.102099 0.1975061

========================================================
Indirect:

Iterations = 1:100
Thinning interval = 1 
Number of chains = 1 
Sample size per chain = 100 

1. Empirical mean and standard deviation for each variable,
   plus standard error of the mean:

                          Mean       SD  Naive SE Time-series SE
exposure.x            -0.05717 0.036562 0.0036562      0.0036562
conc_L3_no            -1.12876 0.598618 0.0598618      0.0598618
ow.xgW                -0.02879 0.017703 0.0017703      0.0014760
pca.x                  0.03345 0.005557 0.0005557      0.0005557
exposure.x:conc_L3_no  0.22666 0.424407 0.0424407      0.0424407

2. Quantiles for each variable:

                          2.5%      25%      50%      75%    97.5%
exposure.x            -0.13899 -0.07235 -0.05647 -0.03534 0.001240
conc_L3_no            -2.50601 -1.49265 -1.10950 -0.80616 0.024298
ow.xgW                -0.06068 -0.04299 -0.03041 -0.01349 0.002749
pca.x                  0.02472  0.02955  0.03339  0.03638 0.047078
exposure.x:conc_L3_no -0.54317 -0.03394  0.24518  0.46974 1.001986

========================================================
Total:

Iterations = 1:100
Thinning interval = 1 
Number of chains = 1 
Sample size per chain = 100 

1. Empirical mean and standard deviation for each variable,
   plus standard error of the mean:

                          Mean       SD  Naive SE Time-series SE
exposure.x            -0.06903 0.043339 0.0043339      0.0037644
conc_L3_no            -1.36738 0.716113 0.0716113      0.0716113
ow.xgW                -0.03478 0.021232 0.0021232      0.0017766
pca.x                  0.04046 0.005967 0.0005967      0.0005967
exposure.x:conc_L3_no  0.27531 0.507828 0.0507828      0.0507828

2. Quantiles for each variable:

                          2.5%      25%      50%      75%    97.5%
exposure.x            -0.16664 -0.08752 -0.07048 -0.04127 0.001527
conc_L3_no            -2.98228 -1.79694 -1.32928 -0.96494 0.027977
ow.xgW                -0.07292 -0.05149 -0.03700 -0.01669 0.003335
pca.x                  0.03060  0.03602  0.04073  0.04344 0.054322
exposure.x:conc_L3_no -0.66128 -0.04205  0.29545  0.58531 1.181460

========================================================
Simulated standard errors
                            Direct    Indirect       Total
exposure.x            0.0070116330 0.036562358 0.043339285
conc_L3_no            0.1228802587 0.598617852 0.716113034
ow.xgW                0.0036430955 0.017703445 0.021231887
pca.x                 0.0007897488 0.005556694 0.005967293
exposure.x:conc_L3_no 0.0845507163 0.424407325 0.507828422

Simulated z-values:
                          Direct   Indirect      Total
exposure.x            -1.6907920 -1.5636938 -1.5927246
conc_L3_no            -1.9418812 -1.8856115 -1.9094466
ow.xgW                -1.6445758 -1.6263375 -1.6382493
pca.x                  8.8678163  6.0205187  6.7798795
exposure.x:conc_L3_no  0.5753969  0.5340636  0.5421334

Simulated p-values:
                      Direct   Indirect        Total     
exposure.x            0.090877 0.117889        0.111222  
conc_L3_no            0.052151 0.059347        0.056205  
ow.xgW                0.100057 0.103878        0.101370  
pca.x                 < 2e-16  0.0000000017386 1.2028e-11
exposure.x:conc_L3_no 0.565023 0.593298        0.587727  

2.6.3 model 5


Call:
lm(formula = AfD2019.x ~ exposure.x * conc_L3_no * pca.x + ow.x, 
    data = chi.poly@data)

Residuals:
      Min        1Q    Median        3Q       Max 
-0.087836 -0.021835 -0.001939  0.022185  0.124635 

Coefficients:
                             Estimate Std. Error t value     Pr(>|t|)    
(Intercept)                  0.182180   0.015920  11.444      < 2e-16 ***
exposure.x                  -0.017714   0.012533  -1.413       0.1582    
conc_L3_no                  -0.333807   0.224406  -1.488       0.1375    
pca.x                       -0.008243   0.005918  -1.393       0.1643    
ow.xgW                      -0.029052   0.005270  -5.513 0.0000000578 ***
exposure.x:conc_L3_no       -0.175769   0.168974  -1.040       0.2988    
exposure.x:pca.x             0.027168   0.004900   5.544 0.0000000488 ***
conc_L3_no:pca.x             0.062072   0.068344   0.908       0.3642    
exposure.x:conc_L3_no:pca.x -0.088697   0.050958  -1.741       0.0824 .  
---
Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1

Residual standard error: 0.03472 on 480 degrees of freedom
Multiple R-squared:  0.5446,    Adjusted R-squared:  0.537 
F-statistic: 71.76 on 8 and 480 DF,  p-value: < 2.2e-16

Call:lagsarlm(formula = AfD2019.x ~ exposure.x * conc_L3_no * pca.x + 
    ow.x, data = chi.poly@data, listw = W, na.action = na.exclude)

Residuals:
       Min         1Q     Median         3Q        Max 
-0.0577686 -0.0111302 -0.0010541  0.0105741  0.0501519 

Type: lag 
Coefficients: (asymptotic standard errors) 
                              Estimate Std. Error z value   Pr(>|z|)
(Intercept)                  0.0329660  0.0081948  4.0228 0.00005751
exposure.x                  -0.0062365  0.0059237 -1.0528  0.2924378
conc_L3_no                  -0.0031475  0.1064253 -0.0296  0.9764065
pca.x                       -0.0016105  0.0028016 -0.5749  0.5653915
ow.xgW                      -0.0084463  0.0025678 -3.2893  0.0010044
exposure.x:conc_L3_no       -0.0487720  0.0798668 -0.6107  0.5414204
exposure.x:pca.x             0.0086872  0.0023566  3.6863  0.0002276
conc_L3_no:pca.x            -0.0195854  0.0324732 -0.6031  0.5464253
exposure.x:conc_L3_no:pca.x -0.0131691  0.0242424 -0.5432  0.5869750

Rho: 0.85854, LR test value: 619.72, p-value: < 2.22e-16
Asymptotic standard error: 0.020569
    z-value: 41.741, p-value: < 2.22e-16
Wald statistic: 1742.3, p-value: < 2.22e-16

Log likelihood: 1263.77 for lag model
ML residual variance (sigma squared): 0.00026932, (sigma: 0.016411)
Number of observations: 489 
Number of parameters estimated: 11 
AIC: -2505.5, (AIC for lm: -1887.8)
LM test for residual autocorrelation
test value: 3.7461, p-value: 0.052931

Impact measures (lag, exact):
                                  Direct     Indirect       Total
exposure.x                  -0.008313425 -0.035773934 -0.04408736
conc_L3_no                  -0.004195690 -0.018054694 -0.02225038
pca.x                       -0.002146851 -0.009238228 -0.01138508
ow.xgW                      -0.011259287 -0.048450429 -0.05970972
exposure.x:conc_L3_no       -0.065014908 -0.279769061 -0.34478397
exposure.x:pca.x             0.011580414  0.049832285  0.06141270
conc_L3_no:pca.x            -0.026108091 -0.112347095 -0.13845519
exposure.x:conc_L3_no:pca.x -0.017554895 -0.075541389 -0.09309628
Impact measures (lag, exact):
                                  Direct     Indirect       Total
exposure.x                  -0.008313425 -0.035773934 -0.04408736
conc_L3_no                  -0.004195690 -0.018054694 -0.02225038
pca.x                       -0.002146851 -0.009238228 -0.01138508
ow.xgW                      -0.011259287 -0.048450429 -0.05970972
exposure.x:conc_L3_no       -0.065014908 -0.279769061 -0.34478397
exposure.x:pca.x             0.011580414  0.049832285  0.06141270
conc_L3_no:pca.x            -0.026108091 -0.112347095 -0.13845519
exposure.x:conc_L3_no:pca.x -0.017554895 -0.075541389 -0.09309628
========================================================
Simulation results ( variance matrix):
Direct:

Iterations = 1:100
Thinning interval = 1 
Number of chains = 1 
Sample size per chain = 100 

1. Empirical mean and standard deviation for each variable,
   plus standard error of the mean:

                                 Mean       SD  Naive SE Time-series SE
exposure.x                  -0.009333 0.007507 0.0007507      0.0007507
conc_L3_no                  -0.010536 0.148060 0.0148060      0.0112179
pca.x                       -0.001894 0.003497 0.0003497      0.0003497
ow.xgW                      -0.011651 0.003333 0.0003333      0.0003333
exposure.x:conc_L3_no       -0.057439 0.109923 0.0109923      0.0081945
exposure.x:pca.x             0.011361 0.003212 0.0003212      0.0003212
conc_L3_no:pca.x            -0.027908 0.043201 0.0043201      0.0043201
exposure.x:conc_L3_no:pca.x -0.016625 0.032899 0.0032899      0.0032899

2. Quantiles for each variable:

                                 2.5%       25%       50%        75%     97.5%
exposure.x                  -0.023610 -0.014736 -0.009256 -0.0038154  0.004937
conc_L3_no                  -0.322626 -0.112044 -0.019240  0.0873515  0.285788
pca.x                       -0.007773 -0.004441 -0.002260  0.0004978  0.004728
ow.xgW                      -0.017975 -0.013366 -0.011464 -0.0094341 -0.005075
exposure.x:conc_L3_no       -0.274704 -0.133086 -0.051404  0.0118849  0.145152
exposure.x:pca.x             0.004532  0.009400  0.011710  0.0136384  0.016762
conc_L3_no:pca.x            -0.101009 -0.057948 -0.034367  0.0067210  0.051411
exposure.x:conc_L3_no:pca.x -0.086749 -0.039135 -0.016006  0.0065896  0.040318

========================================================
Indirect:

Iterations = 1:100
Thinning interval = 1 
Number of chains = 1 
Sample size per chain = 100 

1. Empirical mean and standard deviation for each variable,
   plus standard error of the mean:

                                 Mean      SD Naive SE Time-series SE
exposure.x                  -0.042148 0.03517 0.003517       0.003517
conc_L3_no                  -0.041738 0.67599 0.067599       0.052012
pca.x                       -0.007924 0.01577 0.001577       0.001577
ow.xgW                      -0.050913 0.01476 0.001476       0.001476
exposure.x:conc_L3_no       -0.251722 0.50258 0.050258       0.037611
exposure.x:pca.x             0.049811 0.01579 0.001579       0.001451
conc_L3_no:pca.x            -0.131978 0.19934 0.019934       0.019934
exposure.x:conc_L3_no:pca.x -0.068074 0.14704 0.014704       0.014704

2. Quantiles for each variable:

                                2.5%      25%       50%       75%    97.5%
exposure.x                  -0.10952 -0.06532 -0.042696 -0.016953  0.02220
conc_L3_no                  -1.34087 -0.49887 -0.074959  0.350094  1.22873
pca.x                       -0.03362 -0.01933 -0.009527  0.002266  0.02266
ow.xgW                      -0.08411 -0.05786 -0.049500 -0.041813 -0.02186
exposure.x:conc_L3_no       -1.21987 -0.59497 -0.213362  0.057377  0.62841
exposure.x:pca.x             0.02177  0.04017  0.049185  0.058100  0.08009
conc_L3_no:pca.x            -0.48497 -0.26944 -0.142589  0.026368  0.22048
exposure.x:conc_L3_no:pca.x -0.34206 -0.15713 -0.070682  0.026114  0.18573

========================================================
Total:

Iterations = 1:100
Thinning interval = 1 
Number of chains = 1 
Sample size per chain = 100 

1. Empirical mean and standard deviation for each variable,
   plus standard error of the mean:

                                 Mean      SD Naive SE Time-series SE
exposure.x                  -0.051481 0.04253 0.004253       0.004253
conc_L3_no                  -0.052274 0.82281 0.082281       0.063087
pca.x                       -0.009818 0.01922 0.001922       0.001922
ow.xgW                      -0.062564 0.01772 0.001772       0.001564
exposure.x:conc_L3_no       -0.309161 0.61132 0.061132       0.045665
exposure.x:pca.x             0.061172 0.01859 0.001859       0.001670
conc_L3_no:pca.x            -0.159886 0.24198 0.024198       0.024198
exposure.x:conc_L3_no:pca.x -0.084699 0.17951 0.017951       0.017951

2. Quantiles for each variable:

                                2.5%      25%      50%       75%    97.5%
exposure.x                  -0.13313 -0.08140 -0.05232 -0.021250  0.02713
conc_L3_no                  -1.66350 -0.60387 -0.09721  0.438071  1.51428
pca.x                       -0.04099 -0.02395 -0.01193  0.002764  0.02714
ow.xgW                      -0.10249 -0.07039 -0.06131 -0.052110 -0.02668
exposure.x:conc_L3_no       -1.47776 -0.72098 -0.26803  0.069127  0.77356
exposure.x:pca.x             0.02661  0.04915  0.06107  0.071829  0.09722
conc_L3_no:pca.x            -0.58543 -0.32387 -0.17654  0.033089  0.26609
exposure.x:conc_L3_no:pca.x -0.41759 -0.19543 -0.08655  0.033100  0.22342

========================================================
Simulated standard errors
                                 Direct   Indirect      Total
exposure.x                  0.007507134 0.03516604 0.04252962
conc_L3_no                  0.148060214 0.67599062 0.82281346
pca.x                       0.003496526 0.01576534 0.01922056
ow.xgW                      0.003332511 0.01476417 0.01771511
exposure.x:conc_L3_no       0.109922894 0.50257557 0.61131645
exposure.x:pca.x            0.003212036 0.01579248 0.01859489
conc_L3_no:pca.x            0.043201207 0.19934205 0.24197691
exposure.x:conc_L3_no:pca.x 0.032899249 0.14704454 0.17950826

Simulated z-values:
                                 Direct    Indirect       Total
exposure.x                  -1.24323001 -1.19853574 -1.21047049
conc_L3_no                  -0.07116047 -0.06174369 -0.06353104
pca.x                       -0.54176941 -0.50259653 -0.51080269
ow.xgW                      -3.49624440 -3.44840473 -3.53168109
exposure.x:conc_L3_no       -0.52253737 -0.50086353 -0.50572923
exposure.x:pca.x             3.53695569  3.15407577  3.28969463
conc_L3_no:pca.x            -0.64600500 -0.66206802 -0.66074981
exposure.x:conc_L3_no:pca.x -0.50534346 -0.46294843 -0.47184156

Simulated p-values:
                            Direct     Indirect   Total     
exposure.x                  0.21378309 0.23070852 0.22609841
conc_L3_no                  0.94327004 0.95076694 0.94934365
pca.x                       0.58797737 0.61524797 0.60948923
ow.xgW                      0.00047186 0.00056391 0.00041293
exposure.x:conc_L3_no       0.60129623 0.61646717 0.61304675
exposure.x:pca.x            0.00040477 0.00161007 0.00100296
conc_L3_no:pca.x            0.51827612 0.50792763 0.50877278
exposure.x:conc_L3_no:pca.x 0.61331762 0.64340134 0.63703989

2.6.4 model 6


Call:
lm(formula = AfD2019.x ~ exposure.x + exposure.x * ow.x + pca.x + 
    conc_L3_no, data = chi.poly@data)

Residuals:
      Min        1Q    Median        3Q       Max 
-0.091792 -0.022369 -0.001599  0.023735  0.134505 

Coefficients:
                   Estimate Std. Error t value Pr(>|t|)    
(Intercept)        0.203669   0.012465  16.339  < 2e-16 ***
exposure.x        -0.031383   0.009158  -3.427 0.000663 ***
ow.xgW            -0.021448   0.015101  -1.420 0.156162    
pca.x              0.018844   0.001104  17.070  < 2e-16 ***
conc_L3_no        -0.643394   0.052465 -12.263  < 2e-16 ***
exposure.x:ow.xgW -0.002983   0.012784  -0.233 0.815590    
---
Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1

Residual standard error: 0.03603 on 483 degrees of freedom
Multiple R-squared:  0.5066,    Adjusted R-squared:  0.5015 
F-statistic: 99.18 on 5 and 483 DF,  p-value: < 2.2e-16

Call:lagsarlm(formula = AfD2019.x ~ exposure.x + exposure.x * ow.x + 
    pca.x + conc_L3_no, data = chi.poly@data, listw = W, na.action = na.exclude)

Residuals:
       Min         1Q     Median         3Q        Max 
-0.0548995 -0.0121838  0.0002999  0.0107468  0.0510557 

Type: lag 
Coefficients: (asymptotic standard errors) 
                     Estimate  Std. Error z value  Pr(>|z|)
(Intercept)        0.03085365  0.00683126  4.5165 6.286e-06
exposure.x        -0.00445945  0.00430266 -1.0364    0.3000
ow.xgW            -0.00057115  0.00707961 -0.0807    0.9357
pca.x              0.00504710  0.00062636  8.0578 6.661e-16
conc_L3_no        -0.12199317  0.02620502 -4.6553 3.235e-06
exposure.x:ow.xgW -0.00353529  0.00599959 -0.5893    0.5557

Rho: 0.86976, LR test value: 627.26, p-value: < 2.22e-16
Asymptotic standard error: 0.019613
    z-value: 44.347, p-value: < 2.22e-16
Wald statistic: 1966.7, p-value: < 2.22e-16

Log likelihood: 1247.926 for lag model
ML residual variance (sigma squared): 0.0002848, (sigma: 0.016876)
Number of observations: 489 
Number of parameters estimated: 8 
AIC: -2479.9, (AIC for lm: -1854.6)
LM test for residual autocorrelation
test value: 1.4659, p-value: 0.22599

Impact measures (lag, exact):
                         Direct     Indirect        Total
exposure.x        -0.0060435430 -0.028197947 -0.034241490
ow.xgW            -0.0007740364 -0.003611497 -0.004385534
pca.x              0.0068399365  0.031913758  0.038753694
conc_L3_no        -0.1653278418 -0.771386211 -0.936714053
exposure.x:ow.xgW -0.0047910968 -0.022354287 -0.027145384
Impact measures (lag, exact):
                         Direct     Indirect        Total
exposure.x        -0.0060435430 -0.028197947 -0.034241490
ow.xgW            -0.0007740364 -0.003611497 -0.004385534
pca.x              0.0068399365  0.031913758  0.038753694
conc_L3_no        -0.1653278418 -0.771386211 -0.936714053
exposure.x:ow.xgW -0.0047910968 -0.022354287 -0.027145384
========================================================
Simulation results ( variance matrix):
Direct:

Iterations = 1:100
Thinning interval = 1 
Number of chains = 1 
Sample size per chain = 100 

1. Empirical mean and standard deviation for each variable,
   plus standard error of the mean:

                       Mean       SD  Naive SE Time-series SE
exposure.x        -0.006957 0.006152 0.0006152     0.00061522
ow.xgW            -0.002866 0.009138 0.0009138     0.00091382
pca.x              0.006845 0.000703 0.0000703     0.00008387
conc_L3_no        -0.163394 0.032364 0.0032364     0.00323643
exposure.x:ow.xgW -0.003060 0.008266 0.0008266     0.00082662

2. Quantiles for each variable:

                       2.5%       25%       50%       75%     97.5%
exposure.x        -0.018593 -0.010736 -0.007204 -0.003273  0.005858
ow.xgW            -0.018812 -0.009410 -0.003113  0.004397  0.013610
pca.x              0.005582  0.006394  0.006802  0.007241  0.008242
conc_L3_no        -0.221127 -0.186521 -0.162957 -0.139678 -0.104641
exposure.x:ow.xgW -0.017897 -0.008943 -0.002929  0.002047  0.013512

========================================================
Indirect:

Iterations = 1:100
Thinning interval = 1 
Number of chains = 1 
Sample size per chain = 100 

1. Empirical mean and standard deviation for each variable,
   plus standard error of the mean:

                      Mean       SD  Naive SE Time-series SE
exposure.x        -0.03309 0.030128 0.0030128      0.0030128
ow.xgW            -0.01363 0.043772 0.0043772      0.0043772
pca.x              0.03223 0.005043 0.0005043      0.0005693
conc_L3_no        -0.77023 0.187895 0.0187895      0.0121885
exposure.x:ow.xgW -0.01390 0.039031 0.0039031      0.0039031

2. Quantiles for each variable:

                      2.5%      25%      50%       75%    97.5%
exposure.x        -0.09546 -0.05171 -0.03106 -0.014338  0.02770
ow.xgW            -0.09237 -0.04342 -0.01461  0.018962  0.06443
pca.x              0.02433  0.02831  0.03163  0.034977  0.04262
conc_L3_no        -1.23649 -0.86625 -0.75614 -0.639741 -0.46595
exposure.x:ow.xgW -0.08318 -0.04166 -0.01286  0.009919  0.06701

========================================================
Total:

Iterations = 1:100
Thinning interval = 1 
Number of chains = 1 
Sample size per chain = 100 

1. Empirical mean and standard deviation for each variable,
   plus standard error of the mean:

                      Mean       SD  Naive SE Time-series SE
exposure.x        -0.04005 0.036149 0.0036149      0.0036149
ow.xgW            -0.01650 0.052820 0.0052820      0.0052820
pca.x              0.03907 0.005291 0.0005291      0.0005866
conc_L3_no        -0.93363 0.213041 0.0213041      0.0141082
exposure.x:ow.xgW -0.01696 0.047222 0.0047222      0.0047222

2. Quantiles for each variable:

                      2.5%      25%      50%      75%    97.5%
exposure.x        -0.11277 -0.06317 -0.03809 -0.01772  0.03390
ow.xgW            -0.11078 -0.05141 -0.01754  0.02325  0.07804
pca.x              0.03052  0.03547  0.03828  0.04212  0.05001
conc_L3_no        -1.45024 -1.03050 -0.91927 -0.78948 -0.58861
exposure.x:ow.xgW -0.09991 -0.05202 -0.01587  0.01205  0.08024

========================================================
Simulated standard errors
                        Direct    Indirect       Total
exposure.x        0.0061521831 0.030128256 0.036149416
ow.xgW            0.0091382294 0.043772240 0.052819877
pca.x             0.0007029803 0.005042761 0.005290588
conc_L3_no        0.0323642820 0.187894693 0.213041321
exposure.x:ow.xgW 0.0082661522 0.039031358 0.047222278

Simulated z-values:
                      Direct   Indirect      Total
exposure.x        -1.1308416 -1.0982462 -1.1077741
ow.xgW            -0.3136114 -0.3114242 -0.3123368
pca.x              9.7364607  6.3908608  7.3852128
conc_L3_no        -5.0485866 -4.0992785 -4.3823731
exposure.x:ow.xgW -0.3701456 -0.3562040 -0.3592119

Simulated p-values:
                  Direct        Indirect         Total     
exposure.x        0.25812       0.27210          0.26796   
ow.xgW            0.75382       0.75548          0.75478   
pca.x             < 2.22e-16    0.00000000016495 1.5210e-13
conc_L3_no        0.00000044509 0.00004144401068 1.1739e-05
exposure.x:ow.xgW 0.71127       0.72169          0.71944   

2.6.5 model 7


Call:
lm(formula = AfD2019.x ~ exposure.x * pca.x * ow.x + conc_L3_no, 
    data = chi.poly@data)

Residuals:
      Min        1Q    Median        3Q       Max 
-0.080501 -0.020210 -0.002306  0.020121  0.140016 

Coefficients:
                         Estimate Std. Error t value Pr(>|t|)    
(Intercept)              0.173388   0.013311  13.026  < 2e-16 ***
exposure.x              -0.016383   0.009535  -1.718   0.0864 .  
pca.x                   -0.045714   0.007551  -6.054 2.85e-09 ***
ow.xgW                   0.005378   0.016039   0.335   0.7376    
conc_L3_no              -0.562751   0.051810 -10.862  < 2e-16 ***
exposure.x:pca.x         0.053671   0.005591   9.600  < 2e-16 ***
exposure.x:ow.xgW       -0.020343   0.012772  -1.593   0.1119    
pca.x:ow.xgW             0.067342   0.008405   8.012 8.61e-15 ***
exposure.x:pca.x:ow.xgW -0.058811   0.006576  -8.943  < 2e-16 ***
---
Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1

Residual standard error: 0.03263 on 480 degrees of freedom
Multiple R-squared:  0.5977,    Adjusted R-squared:  0.591 
F-statistic: 89.16 on 8 and 480 DF,  p-value: < 2.2e-16

Call:lagsarlm(formula = AfD2019.x ~ exposure.x * pca.x * ow.x + conc_L3_no, 
    data = chi.poly@data, listw = W, na.action = na.exclude)

Residuals:
        Min          1Q      Median          3Q         Max 
-0.06443781 -0.01137080 -0.00064648  0.00998972  0.05163998 

Type: lag 
Coefficients: (asymptotic standard errors) 
                           Estimate  Std. Error z value    Pr(>|z|)
(Intercept)              0.03491460  0.00745419  4.6839 0.000002815
exposure.x              -0.00540994  0.00481953 -1.1225   0.2616485
pca.x                   -0.00910488  0.00388750 -2.3421   0.0191760
ow.xgW                  -0.00099758  0.00811260 -0.1230   0.9021337
conc_L3_no              -0.10744823  0.02808147 -3.8263   0.0001301
exposure.x:pca.x         0.01350465  0.00295446  4.5709 0.000004855
exposure.x:ow.xgW       -0.00397901  0.00649660 -0.6125   0.5402227
pca.x:ow.xgW             0.01525954  0.00440099  3.4673   0.0005257
exposure.x:pca.x:ow.xgW -0.01527487  0.00345083 -4.4264 0.000009581

Rho: 0.83606, LR test value: 562.31, p-value: < 2.22e-16
Asymptotic standard error: 0.021985
    z-value: 38.028, p-value: < 2.22e-16
Wald statistic: 1446.2, p-value: < 2.22e-16

Log likelihood: 1265.387 for lag model
ML residual variance (sigma squared): 0.00027203, (sigma: 0.016493)
Number of observations: 489 
Number of parameters estimated: 11 
AIC: -2508.8, (AIC for lm: -1948.5)
LM test for residual autocorrelation
test value: 3.7702, p-value: 0.052172

Impact measures (lag, exact):
                              Direct     Indirect        Total
exposure.x              -0.007003710 -0.025996791 -0.033000501
pca.x                   -0.011787178 -0.043752355 -0.055539533
ow.xgW                  -0.001291463 -0.004793729 -0.006085191
conc_L3_no              -0.139102506 -0.516329019 -0.655431525
exposure.x:pca.x         0.017483119  0.064894888  0.082378007
exposure.x:ow.xgW       -0.005151232 -0.019120651 -0.024271883
pca.x:ow.xgW             0.019755007  0.073327818  0.093082824
exposure.x:pca.x:ow.xgW -0.019774844 -0.073401453 -0.093176297
Impact measures (lag, exact):
                              Direct     Indirect        Total
exposure.x              -0.007003710 -0.025996791 -0.033000501
pca.x                   -0.011787178 -0.043752355 -0.055539533
ow.xgW                  -0.001291463 -0.004793729 -0.006085191
conc_L3_no              -0.139102506 -0.516329019 -0.655431525
exposure.x:pca.x         0.017483119  0.064894888  0.082378007
exposure.x:ow.xgW       -0.005151232 -0.019120651 -0.024271883
pca.x:ow.xgW             0.019755007  0.073327818  0.093082824
exposure.x:pca.x:ow.xgW -0.019774844 -0.073401453 -0.093176297
========================================================
Simulation results ( variance matrix):
Direct:

Iterations = 1:100
Thinning interval = 1 
Number of chains = 1 
Sample size per chain = 100 

1. Empirical mean and standard deviation for each variable,
   plus standard error of the mean:

                             Mean       SD  Naive SE Time-series SE
exposure.x              -0.007717 0.006286 0.0006286      0.0006286
pca.x                   -0.012190 0.004521 0.0004521      0.0004521
ow.xgW                  -0.001091 0.011233 0.0011233      0.0011233
conc_L3_no              -0.133510 0.035686 0.0035686      0.0035686
exposure.x:pca.x         0.017760 0.003496 0.0003496      0.0003496
exposure.x:ow.xgW       -0.005499 0.009390 0.0009390      0.0009390
pca.x:ow.xgW             0.020104 0.005273 0.0005273      0.0005273
exposure.x:pca.x:ow.xgW -0.020053 0.004240 0.0004240      0.0004240

2. Quantiles for each variable:

                            2.5%       25%        50%         75%     97.5%
exposure.x              -0.02060 -0.011595 -0.0073355 -0.00338597  0.002115
pca.x                   -0.02082 -0.015401 -0.0120334 -0.00922403 -0.004556
ow.xgW                  -0.02157 -0.009233 -0.0002232  0.00745506  0.017094
conc_L3_no              -0.20485 -0.155147 -0.1341777 -0.10483422 -0.078081
exposure.x:pca.x         0.01151  0.015529  0.0175566  0.01970916  0.024075
exposure.x:ow.xgW       -0.01952 -0.012465 -0.0067625  0.00007553  0.014230
pca.x:ow.xgW             0.01062  0.016522  0.0203117  0.02411202  0.028860
exposure.x:pca.x:ow.xgW -0.02754 -0.023084 -0.0200478 -0.01703590 -0.012060

========================================================
Indirect:

Iterations = 1:100
Thinning interval = 1 
Number of chains = 1 
Sample size per chain = 100 

1. Empirical mean and standard deviation for each variable,
   plus standard error of the mean:

                             Mean      SD Naive SE Time-series SE
exposure.x              -0.029034 0.02487 0.002487       0.002487
pca.x                   -0.045458 0.01689 0.001689       0.001689
ow.xgW                  -0.003931 0.04315 0.004315       0.004315
conc_L3_no              -0.498613 0.14273 0.014273       0.008210
exposure.x:pca.x         0.066368 0.01392 0.001392       0.001392
exposure.x:ow.xgW       -0.020635 0.03635 0.003635       0.003635
pca.x:ow.xgW             0.075008 0.02003 0.002003       0.002003
exposure.x:pca.x:ow.xgW -0.074908 0.01671 0.001671       0.001389

2. Quantiles for each variable:

                            2.5%      25%       50%        75%     97.5%
exposure.x              -0.09382 -0.04375 -0.026161 -0.0116145  0.009269
pca.x                   -0.08092 -0.05758 -0.044379 -0.0336462 -0.019130
ow.xgW                  -0.09504 -0.03132 -0.001032  0.0289558  0.066777
conc_L3_no              -0.76853 -0.60219 -0.470602 -0.3904759 -0.295598
exposure.x:pca.x         0.04380  0.05588  0.067823  0.0757687  0.093011
exposure.x:ow.xgW       -0.07934 -0.04687 -0.023112  0.0002534  0.061056
pca.x:ow.xgW             0.03979  0.05953  0.076065  0.0883623  0.111466
exposure.x:pca.x:ow.xgW -0.10613 -0.08403 -0.076037 -0.0623167 -0.047246

========================================================
Total:

Iterations = 1:100
Thinning interval = 1 
Number of chains = 1 
Sample size per chain = 100 

1. Empirical mean and standard deviation for each variable,
   plus standard error of the mean:

                             Mean      SD Naive SE Time-series SE
exposure.x              -0.036751 0.03104 0.003104       0.003104
pca.x                   -0.057648 0.02113 0.002113       0.002113
ow.xgW                  -0.005021 0.05429 0.005429       0.005429
conc_L3_no              -0.632123 0.17427 0.017427       0.010228
exposure.x:pca.x         0.084129 0.01672 0.001672       0.001672
exposure.x:ow.xgW       -0.026134 0.04565 0.004565       0.004565
pca.x:ow.xgW             0.095112 0.02468 0.002468       0.002468
exposure.x:pca.x:ow.xgW -0.094960 0.02021 0.002021       0.001729

2. Quantiles for each variable:

                            2.5%      25%       50%       75%    97.5%
exposure.x              -0.11440 -0.05622 -0.033504 -0.015297  0.01132
pca.x                   -0.10272 -0.07333 -0.057312 -0.042245 -0.02407
ow.xgW                  -0.11628 -0.04127 -0.001255  0.036099  0.08385
conc_L3_no              -0.95084 -0.74940 -0.614751 -0.498685 -0.38139
exposure.x:pca.x         0.05741  0.07150  0.085621  0.095783  0.11728
exposure.x:ow.xgW       -0.09755 -0.06327 -0.029476  0.000329  0.07528
pca.x:ow.xgW             0.05125  0.07464  0.095880  0.112476  0.14268
exposure.x:pca.x:ow.xgW -0.13180 -0.10868 -0.096028 -0.079048 -0.05972

========================================================
Simulated standard errors
                             Direct   Indirect      Total
exposure.x              0.006286476 0.02486941 0.03104358
pca.x                   0.004520530 0.01689068 0.02112833
ow.xgW                  0.011233189 0.04314733 0.05429161
conc_L3_no              0.035686332 0.14272554 0.17426938
exposure.x:pca.x        0.003496096 0.01391569 0.01671531
exposure.x:ow.xgW       0.009390300 0.03634819 0.04565251
pca.x:ow.xgW            0.005272931 0.02002868 0.02468248
exposure.x:pca.x:ow.xgW 0.004240484 0.01670664 0.02021042

Simulated z-values:
                             Direct    Indirect       Total
exposure.x              -1.22756824 -1.16744282 -1.18384192
pca.x                   -2.69647919 -2.69132004 -2.72845681
ow.xgW                  -0.09707945 -0.09109757 -0.09248442
conc_L3_no              -3.74119592 -3.49351240 -3.62727510
exposure.x:pca.x         5.07999018  4.76932514  5.03302670
exposure.x:ow.xgW       -0.58556250 -0.56771348 -0.57245409
pca.x:ow.xgW             3.81271028  3.74501826  3.85341778
exposure.x:pca.x:ow.xgW -4.72891521 -4.48369982 -4.69858939

Simulated p-values:
                        Direct        Indirect     Total       
exposure.x              0.21960909    0.24303159   0.23647565  
pca.x                   0.00700768    0.00711699   0.00636314  
ow.xgW                  0.92266330    0.92741507   0.92631317  
conc_L3_no              0.00018315    0.00047671   0.00028643  
exposure.x:pca.x        0.00000037745 0.0000018484 0.0000004828
exposure.x:ow.xgW       0.55816956    0.57022954   0.56701438  
pca.x:ow.xgW            0.00013745    0.00018038   0.00011648  
exposure.x:pca.x:ow.xgW 0.00000225723 0.0000073360 0.0000026196

2.7 Table 4. SAR model 8

OGR data source with driver: ESRI Shapefile 
Source: "/Users/jisukim/Dropbox/Work/BIGSSS_Migration/3_Migration_data/data/final_dataset/data_multivariata.shp", layer: "data_multivariata"
with 489 features
It has 46 fields
Integer64 fields read as strings:  voters2014 voters2019 shift_vote 
chi.ols<-lm(AfD2019.x~exposure_n+ow.x+conc_L3_no+pca.x, data=chi.poly@data, na.action=na.exclude)
summary(chi.ols)

Call:
lm(formula = AfD2019.x ~ exposure_n + ow.x + conc_L3_no + pca.x, 
    data = chi.poly@data, na.action = na.exclude)

Residuals:
      Min        1Q    Median        3Q       Max 
-0.084377 -0.023985  0.000434  0.024440  0.099976 

Coefficients:
             Estimate Std. Error t value    Pr(>|t|)    
(Intercept) -0.046763   0.041486  -1.127       0.261    
exposure_n  -0.047204   0.009017  -5.235 0.000000303 ***
ow.xgW      -0.033163   0.006247  -5.308 0.000000210 ***
conc_L3_no  -0.580681   0.060635  -9.577     < 2e-16 ***
pca.x        0.017875   0.001297  13.779     < 2e-16 ***
---
Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1

Residual standard error: 0.03586 on 313 degrees of freedom
Multiple R-squared:  0.5782,    Adjusted R-squared:  0.5729 
F-statistic: 107.3 on 4 and 313 DF,  p-value: < 2.2e-16
chi.ols<-lm(AfD2019.x~exposure.x+ow.x+conc_L3_no+pca.x, data=chi.poly@data, na.action=na.exclude)
summary(chi.ols)

Call:
lm(formula = AfD2019.x ~ exposure.x + ow.x + conc_L3_no + pca.x, 
    data = chi.poly@data, na.action = na.exclude)

Residuals:
      Min        1Q    Median        3Q       Max 
-0.087946 -0.024598 -0.000244  0.025542  0.099723 

Coefficients:
             Estimate Std. Error t value  Pr(>|t|)    
(Intercept)  0.211726   0.012400  17.074   < 2e-16 ***
exposure.x  -0.033619   0.009305  -3.613  0.000353 ***
ow.xgW      -0.026605   0.006239  -4.265 0.0000266 ***
conc_L3_no  -0.662164   0.057757 -11.465   < 2e-16 ***
pca.x        0.018792   0.001324  14.189   < 2e-16 ***
---
Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1

Residual standard error: 0.03664 on 313 degrees of freedom
Multiple R-squared:  0.5597,    Adjusted R-squared:  0.5541 
F-statistic: 99.46 on 4 and 313 DF,  p-value: < 2.2e-16
Characteristics of weights list object:
Neighbour list object:
Number of regions: 318 
Number of nonzero links: 1484 
Percentage nonzero weights: 1.467505 
Average number of links: 4.666667 
1 region with no links:
10

Weights style: W 
Weights constants summary:

2.7.1 OLS


Call:
lm(formula = AfD2019.x ~ exposure_n + ow.x + conc_L3_no + pca.x + 
    exposure_n * sum_capacity, data = chi.poly@data, na.action = na.exclude, 
    zero.policy = TRUE)

Residuals:
      Min        1Q    Median        3Q       Max 
-0.081941 -0.026626  0.000747  0.024250  0.099199 

Coefficients:
                           Estimate  Std. Error t value Pr(>|t|)    
(Intercept)             -0.19248918  0.06104871  -3.153  0.00177 ** 
exposure_n              -0.07529190  0.01324626  -5.684 3.03e-08 ***
ow.xgW                  -0.03350720  0.00602661  -5.560 5.82e-08 ***
conc_L3_no              -0.50448336  0.06046942  -8.343 2.39e-15 ***
pca.x                    0.01638107  0.00129854  12.615  < 2e-16 ***
sum_capacity             0.00014720  0.00007312   2.013  0.04497 *  
exposure_n:sum_capacity  0.00002812  0.00001650   1.704  0.08940 .  
---
Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1

Residual standard error: 0.03456 on 311 degrees of freedom
Multiple R-squared:  0.6107,    Adjusted R-squared:  0.6032 
F-statistic: 81.32 on 6 and 311 DF,  p-value: < 2.2e-16

2.7.2 SAR model 8 (EF:Total capacity)


Call:lagsarlm(formula = AfD2019.x ~ exposure_n + ow.x + conc_L3_no + 
    pca.x + exposure_n * sum_capacity, data = chi.poly@data,     listw = W, na.action = na.exclude, zero.policy = TRUE)

Residuals:
        Min          1Q      Median          3Q         Max 
-0.05355067 -0.01348925  0.00021153  0.01058645  0.11685232 

Type: lag 
Regions with no neighbours included:
 10 
Coefficients: (asymptotic standard errors) 
                             Estimate    Std. Error z value  Pr(>|z|)
(Intercept)             -0.0985688922  0.0342088497 -2.8814  0.003959
exposure_n              -0.0309768808  0.0075578531 -4.0986 4.156e-05
ow.xgW                  -0.0109701279  0.0036075314 -3.0409  0.002359
conc_L3_no              -0.1596728467  0.0360743099 -4.4262 9.590e-06
pca.x                    0.0064147625  0.0008540442  7.5110 5.862e-14
sum_capacity             0.0001071627  0.0000409599  2.6163  0.008889
exposure_n:sum_capacity  0.0000229647  0.0000092382  2.4858  0.012924

Rho: 0.74808, LR test value: 305.77, p-value: < 2.22e-16
Asymptotic standard error: 0.029917
    z-value: 25.005, p-value: < 2.22e-16
Wald statistic: 625.25, p-value: < 2.22e-16

Log likelihood: 775.2625 for lag model
ML residual variance (sigma squared): 0.00037339, (sigma: 0.019323)
Number of observations: 318 
Number of parameters estimated: 9 
AIC: -1532.5, (AIC for lm: -1228.8)
LM test for residual autocorrelation
test value: 2.2362, p-value: 0.13481

Impact measures (lag, exact):
                                Direct       Indirect          Total
exposure_n              -0.03862377229 -0.08434044842 -0.12296422072
ow.xgW                  -0.01367819192 -0.02986825914 -0.04354645106
conc_L3_no              -0.19908936959 -0.43473968780 -0.63382905739
pca.x                    0.00799829802  0.01746541059  0.02546370860
sum_capacity             0.00013361661  0.00029177069  0.00042538730
exposure_n:sum_capacity  0.00002863367  0.00006252566  0.00009115933
LS0tCnRpdGxlOiBEaWQgRXhwb3N1cmUgdG8gQXN5bHVtIFNlZWtpbmcgTWlncmF0aW9uIEFmZmVjdCB0aGUgRWxlY3RvcmFsIE91dGNvbWUgb2YgQWx0ZXJuYXRpdmUKICBGb3IgR2VybWFueSBpbiBCZXJsaW4/IEV2aWRlbmNlIGZyb20gdGhlIDIwMTkgRVUgRWxlY3Rpb25zLgphdXRob3I6Ci0gYWZmaWxpYXRpb246IE1heCB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